package com.cosina.game.crystallight.ui.battle.drawadapter;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Point;
import android.graphics.drawable.Drawable;

import com.cosina.game.crystallight.ui.common.PaintSuite;

public abstract class BaseDrawable extends Drawable {

	@Override
	public abstract void draw(Canvas canvas) ;

	@Override
	public int getOpacity() {
		return 0;
	}

	@Override
	public void setAlpha(int alpha) {
	}

	@Override
	public void setColorFilter(ColorFilter cf) {
		
	}
	
	
	public int getXSpan(){
		return 0;
	}
	
	public int getYSpan(){
		return 0;
	}
	
	public final void drawTile(Canvas canvas, Bitmap bitmap, Point location){
		canvas.drawBitmap(bitmap, 
				location.x * 44 + getXSpan(), 
				location.y *44 + getYSpan(), 
				PaintSuite.p4Simple);
	}
	
	public final void drawTile(Canvas canvas, Bitmap bitmap, int tileX, int tileY){
		canvas.drawBitmap(bitmap, 
				tileX * 44 + getXSpan(), 
				tileY *44 + getYSpan(), 
				PaintSuite.p4Simple);
	}
}
